export let Data = function () {
    let DataList = []
    for (let i = 30; i > 0; i--) {
        let obj = {
            name:filterDate(i),
            value:Math.floor(Math.random()*10)
        }
        DataList.push(obj)
    }
    return DataList;
}


function filterDate(n) {
    let value = Number(new Date())
    let day = 60 * 60 * 24 * 1000 * n
    const dt = new Date(value - day)
    const y = dt.getFullYear()
    const m = (dt.getMonth() + 1 + '').padStart(2, '0')
    const d = (dt.getDate() + '').padStart(2, '0')
    return `${m}${"-"}${d}`
}



export let weekDay = function(){
    let DataList = []
    for (let i = 7; i > 0; i--) {
        DataList.push(filterDate(i))
    }
   
    return DataList;
}